Programming iOS 12 by Matt Neuburg

Programming iOS 12 by Matt Neuburg

Author:Matt Neuburg
Language: eng
Format: epub
Publisher: O'Reilly Media
Published: 2018-10-10T16:00:00+00:00


In this example, we’re in a UICollectionViewLayout subclass, setting up the animation. We have a property to hold the animator, as well as a Bool property to signal when an animation is in progress:

let visworld = self.collectionView!.bounds let anim = MyDynamicAnimator(collectionViewLayout:self) self.animator = anim self.animating = true // ... configure rest of animation

Our implementation of layoutAttributesForElements(in:), if we are animating, substitutes the layout attributes that come from the animator for those we would normally return. In this particular example, both cells and supplementary items can be animated, so the two cases have to be distinguished:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.